package vars


import org.junit.Test

import static org.junit.Assert.assertEquals

/**
 * 设置环境变量
 * @author zrx
 */
class SetEnvStepTest extends BaseSharedLibTest {
    @Test
    void call() {
        binding.setVariable('env', new HashMap())
        def script = loadScript('setEnvStep.groovy')
        script.invokeMethod("call", [k: '123', v: "456"])
        assertEquals("123", ((HashMap) binding.getVariable("env")).get("k"))
    }
}
